<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智慧校园 - 学生信息管理系统</title>
    <!-- 引入Inter字体 -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <!-- 引入外部CSS文件 -->
    <link rel="stylesheet" href="css/styles.css">
    <!-- 引入Font Awesome图标库 -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
</head>
<body>
    <!-- 顶部背景装饰 -->
    <div class="top-decoration"></div>
    
    <div class="container fade-in">
        <header class="header">
            <div class="header-content">
                <div class="logo-container">
                    <svg class="logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
                        <path d="M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6zm14 2H6v10h12V8z"/>
                        <path d="M6 8h2v10H6zm6 0h2v10h-2zm6 0h2v10h-2z"/>
                    </svg>
                </div>
                <div class="title-section">
                    <h1>智慧校园</h1>
                    <p class="subtitle">学生信息管理系统</p>
                </div>
            </div>
            <p class="description">高效查询和管理学生数据，助力教育管理数字化</p>
        </header>
        
        <main class="content">
            <div class="content-wrapper">
                <!-- 按钮组 -->
                <div class="btn-group">
                    <button id="fetchBtn" class="btn tooltip-container">
                        <span class="tooltip">获取完整学生信息列表</span>
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <polyline points="14 2 14 8 20 8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <line x1="16" y1="13" x2="8" y2="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <line x1="16" y1="17" x2="8" y2="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <polyline points="10 9 9 9 8 9" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                        </svg>
                        获取学生列表
                    </button>
                    <button id="translateBtn" class="btn btn-secondary tooltip-container">
                        <span class="tooltip">打开智能翻译助手</span>
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <polyline points="7 7 7 17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <polyline points="17 7 17 17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <line x1="3" y1="12" x2="21" y2="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                        </svg>
                        翻译
                    </button>
                </div>
            
            <!-- 加载状态 -->
            <div class="loading" id="loading">
                <div class="loading-spinner pulse"></div>
                <p>正在获取数据，请稍候...</p>
            </div>
            
            <!-- 搜索框 -->
            <div class="search-container slide-up" id="searchContainer" style="display: none;">
                <div class="search-wrapper">
                    <div class="search-icon">
                        <i class="fas fa-search"></i>
                    </div>
                    <input type="text" id="searchInput" class="search-input" placeholder="搜索学生姓名或专业...">
                    <button id="searchBtn" class="search-btn">
                        <i class="fas fa-search"></i>
                    </button>
                </div>
            </div>
            
            <!-- 统计卡片 -->
            <div class="stats bounce-in" id="statsContainer" style="display: none;">
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-users"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value" id="totalStudents">0</div>
                        <div class="stat-label">总人数</div>
                    </div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-birthday-cake"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value" id="avgAge">0</div>
                        <div class="stat-label">平均年龄</div>
                    </div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">
                        <i class="fas fa-graduation-cap"></i>
                    </div>
                    <div class="stat-content">
                        <div class="stat-value" id="uniqueMajors">0</div>
                        <div class="stat-label">专业数量</div>
                    </div>
                </div>
            </div>
            
            <!-- 结果区域 -->
            <div id="result" class="empty fade-in">
                <p>点击上方按钮获取学生信息</p>
            </div>
            </div>
        </main>
        
        <!-- 聊天机器人区域 -->
        <div class="chatbot-container fade-in">
            <div class="chatbot-header">
                <h3><i class="fas fa-robot"></i>智能翻译助手</h3>
                <div class="chatbot-features">
                    <i class="fas fa-language" title="多语言支持"></i>
                    <i class="fas fa-magic" title="智能翻译"></i>
                    <i class="fas fa-microphone" title="语音输入"></i>
                </div>
            </div>
            <div class="chatbot-iframe-wrapper">
                <iframe 
                    src="http://localhost/chatbot/F2xL3FSIg7J6GZez" 
                    style="width: 100%; height: 100%; min-height: 700px" 
                    frameborder="0" 
                    allow="microphone"> 
                </iframe>
            </div>
        </div>
    </div>
    
    <!-- 底部装饰 -->
    <div class="bottom-decoration"></div>

    <!-- 引入外部JavaScript文件 -->
    <script src="js/app.js"></script>
</body>
</html>